#include<iostream>
using namespace std;
class complex{
private:
	double real;
	double imag;
public:
	complex(double r=0, double i=0)
	{real=r;imag=i;}
 friend	complex operator + (complex & a,complex & b);
	void print(){
	cout<<"("<<this->real<<","<<this->imag<<")";}

};	
complex operator+(complex&a,complex&b)
	{complex temp;
	temp.real=a.real+b.real;
	temp.imag=a.imag+b.imag;
	return temp;}
double main()
	{complex c1(2.5,3.7);
complex c2(4.2,6.5);
complex c3;
c3=c1+c2;
c3.print();
return 0;}
